package day2;

public class DataTypeDemo {
    public static void main(String[] args) {

        /*
        int a = 5;

        long b = a;
        double c = b;
int d = (int)c;
System.out.println(d);
long B = 6;
double D = (double)B;
System.out.println(D);

long f = 10000000000L;
int g =(int)f;
System.out.println(g);
double h = 3.1415926;
int i = (int)h;
System.out.println(i);
long q = 1000000000000L;

         */
byte a = 5;
byte b = 6;
//byte c = a+b;//编译错误，byte在运算时会自动转成int
  //byte c = (byte)a+b;//编译错误，改类型具有强制性，会先改再计算
    byte c = (byte)(a+b);

System.out.println(2+2);//4
System.out.println(2+'2');//52
System.out.println('2'+'2');//100
System.out.println('2');//字符2
        System.out.println('你'+'好');

        System.out.println('9'+'9');//114

    }
}